package com.example.administrator.capital.login;
import android.os.Handler;
import android.text.TextUtils;
import android.view.View;
import com.example.administrator.capital.MainActivity;
import com.example.administrator.capital.R;
import com.example.administrator.capital.base.BaseActivity;
import com.example.administrator.capital.utils.PreferenceManager;
public class WelcomeActivity extends BaseActivity {
    @Override
    public int getLayoutId() {
        return R.layout.activity_welcome;
    }
    @Override
    public void initView() {
        if (PreferenceManager.instance().getIsFirstIn()) {
            if (TextUtils.isEmpty(PreferenceManager.instance().getToken())) {
                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        showActivity(LoginActivity.class, null);
                        finish();
                    }
                }, 2000);
            } else {
                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        showActivity(MainActivity.class,null);
                        finish();
                    }
                }, 2000);
            }
        } else {
            new Handler().postDelayed(new Runnable() {
                @Override
                public void run() {
                    showActivity(GuideActivity.class,null);
                    finish();
                }
            }, 2000);
        }
    }
    @Override
    public void setListener() {
    }
    @Override
    public void setData() {
    }
    @Override
    public void onClick(View view) {
    }
}
